//
//  InformationModel.m
//  Project_A Gary
//
//  Created by leilei on 16/3/23.
//  Copyright © 2016年 www.lei.com. All rights reserved.
//

#import "InformationModel.h"

@implementation InformationModel

-(void)dealloc
{
    [super dealloc];
    [_title release];
    [_count release];
    [_pubDate release];
    [_imageMain release];
    [_imageLeft release];
    [_imageMid release];
    [_imageRight release];
    
    [_type release];
    
    [_url release];
    [_informationId release];
    
}
// 容错方法 如果找不到image的时候,进去去找
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"image"]) {
        if ([self.type isEqualToNumber:@(3)]) {
            self.imageLeft = value[0];
            self.imageMid = value[1];
            self.imageRight = value[2];
        }else{
            self.imageMain = value;
        }
    }
    if ([key isEqualToString:@"id"]) {
        self.informationId = value;
    }
    
    
}
@end
